-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: get content for user #226
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few comments, just questions, mostly for my own comprehension.
@classmethod | ||
def teardown_class(cls): | ||
cls.item.delete() | ||
assert cls.client.content.count() == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm new to the architecture of this package — for my own learning, what does this do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cls.item
is the content item created in the setup_class
method. L16 performs a delete action, and L17 asserts that the total number of content items on the server is 0. The user used for testing has administrator privileges.
The general idea here is to try and ensure a "clean" server state between test classes. That way, other test classes would not need to be aware of each other. I'm not sure this is viable in the long term, but it's okay for now.
Adds scoped content calls off of the User resource (e.g.,
client.users.find_one().content.find_one()
.